﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/css")
    <style>
        .main-header .logo .logo-mini {
            line-height: initial;
        }

        .sidebar-menu .treeview-menu > li > a {
            padding: 5px 5px 5px 35px;
        }

        .fa-fw {
            text-align: left;
        }

        .navbar {
            margin-bottom: 0px;
        }

        #messageCount {
            display: block;
            position: absolute;
            right: 0;
            top: 8px;
            width: 18px;
            height: 18px;
            background-color: #e82323;
            font-size: 12px;
            text-align: center;
            line-height: 16px;
            border-radius: 18px;
        }
    </style>
    @Scripts.Render("~/bundles/site")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")

    <link href="~/Scripts/icheck/skins/all.css" rel="stylesheet" />
    <script src="~/Scripts/icheck/js/custom.min.js"></script>
    <script src="~/Scripts/icheck/icheck.min.js"></script>
    <link href="~/Scripts/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <script src="~/Scripts/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script src="~/Scripts/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <script>
        $(document).ready(function () {
            $('.icheckbox').iCheck({
                checkboxClass: 'icheckbox_square-blue',
                radioClass: 'iradio_square-blue',
                increaseArea: '20%'
            });
        });
    </script>
    <script src="~/Scripts/validate.js"></script>
</head>
<body class="skin-blue sidebar-mini">
    <div class="wrapper">
        <header class="main-header" style="position:fixed;width:100%;">
            <a href="/" class="logo">
                <span class="logo-mini">
                    @*<img src="~/Content/images/logo1.png"  height="50" width="50" />*@
                </span>
                <span class="logo-lg">
                    @*<img src="~/Content/images/logo2.png" style="margin-bottom:3px"/>*@
                    商城后台管理系统
                </span>
            </a>
            <nav class="navbar navbar-static-top">
                <a href="javascript:setcanvas()" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                </a>
                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">
                        <li>
                            <a href="#" style="text-align:center">您好，@(TbShop.Web.Helpers.SessionHelper.Get(TbShop.StaticWords.SessionUserNameKey))！</a>
                        </li>

                        <li>
                            <a href="@Url.Action("Index","SystemMessage")"><i class="fa fa-envelope" style="text-align:center"></i><span id="messageCount"></span></a>
                        </li>

                        <li>
                            <a href="@Url.Action("Login", "Account")"><i class="fa fa-fw fa-power-off" style="text-align:center"></i></a>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
        <aside class="main-sidebar">
            <section class="sidebar" style="height: auto;">
                @Html.Partial("_SiteMapPartial", TbShop.Web.Helpers.SiteMapHelper.LoadSiteMap())
            </section>
        </aside>
        <div class="content-wrapper">
            <section class="content-header" style="margin-top:50px;">
                <h1>
                    @ViewBag.Title
                    <small>@ViewBag.SubTitle</small>
                </h1>
                <ol class="breadcrumb">
                    <li class="active">@ViewBag.Title</li>
                </ol>
            </section>
            <section class="content">
                @RenderBody()
            </section>
        </div>
        <footer class="main-footer">
            <div class="pull-right hidden-xs">
                <b>Version</b> 1.0.0
            </div>
            <strong>Copyright © 2017 <a href="/Admin">商城信息管理系统</a>.</strong> All rights
            reserved.
        </footer>
    </div>
    <script src="~/Scripts/app.js"></script>
    <script type="text/javascript">
        $(function () {
            $.ajax({
                url: "@Url.Action("MessageDataCount", "SystemMessage")",
                type: "POST",
                dataType: "JSON",
                success: function (data) {
                    $('#messageCount').html(data.messageCount)
                }
            });
            _sitemap("@(ViewBag.ModuleId)");
            _alert_message = "@Session["alert_message"]";
            _alert_message_type = "@Session["alert_message_type"]";
            if (_alert_message.length > 0) {
                show_message(_alert_message, _alert_message_type);
                @{
                    Session.Remove("alert_message");
                    Session.Remove("alert_message_type");
                }
            }
        });

        $.fn.refreshTableRow = function (id, url) {
            var table = $(this);
            $.ajax({
                url: url,
                type: "GET",
                data: { id: id },
                dataType: "JSON",
                success: function (data) {
                    var row = table.bootstrapTable("getRowByUniqueId", id);
                    $.extend(row, data);
                    table.bootstrapTable("updateByUniqueId", id, row);
                }
            });
        };
        $.fn.refreshTableRowByDate = function (id, data) {
            var table = $(this);
            var row = table.bootstrapTable("getRowByUniqueId", id);
            $.extend(row, data);
            table.bootstrapTable("updateByUniqueId", id, row);
        }

    </script>
    @RenderSection("scripts", required: false)
</body>
</html>
